<template>
	<view>
		<view class="" v-if="Object.keys(items).length > 0">
			<video :poster="items.video_cover_img" :src="items.video_link" style="width:100%"></video>
		</view>
		<view class="" style="display: flex;justify-content: space-between;padding: 20rpx;font-size: 32rpx;align-items: center">
			<view class="" style="max-width: 70%;">
				{{items.title}}
			</view>
			<view class="" style="font-size: 28rpx;">
				{{items.createtime}}
			</view>
		</view>
		<view class="" style="padding: 20rpx;">
			<rich-text :nodes="items.content"></rich-text>
		</view>
	</view>
</template>

<script>
	import {
		Lecture
	} from '../../model/lecturehall-model.js';
	var Lectures = new Lecture();
	export default {
		data() {
			return {
				items:{}
			}
		},
		onLoad(option) {
			console.log(option)
			this.getdata(option.id)
		},
		methods: {
			getdata(id){
				var that = this
				let params = {
					id:id
				}
				Lectures.Details((data) => {
					console.log(data)
					if (data.code === 1) {
						that.items = data.data
					} else {
						uni.showToast({
							title: data.msg,
							icon: 'none',
							duration: 2000
						})
					}
				}, params)
			}
		}
	}
</script>

<style>
page{
	background-color: #fff;
}
</style>
